#include <lcir/IR/Constant.h>
#include <lcir/IR/Context.h>
#include <lcir/IR/Lambda.h>
#include <lcir/IR/LambdaProto.h>
#include <lcir/IR/Argument.h>
#include <lcir/IR/Prototype.h>
namespace lcir {

static OwningRefVector<Lambda> lambdas;

// 常量池
static OwningRefVector<Constant> constPool;
Lambda* GlobalContext::getLamda(const std::vector<Type*>& paramTypes, Type* resultType) {
  auto* ptr= new Lambda(paramTypes, resultType);
  lambdas.pushBack(ptr);
  return ptr;
}
Constant* GlobalContext::getConst(std::unique_ptr<Prototype> proto) {
  auto* constant = new Constant(std::move(proto));
  constPool.pushBack(constant);
  return constant;
}
}  // namespace lcir
